@page "/CustomEditor"
@using BlazorDatasheet.Render
@using BlazorDatasheet.Render.DefaultComponents
@using BlazorDatasheet.Core.Data
<h1>Custom Editor</h1>
<PageTitle>Custom Editor</PageTitle>

<Datasheet Sheet="sheet" CustomCellTypeDefinitions="CustomEditors"></Datasheet>

@code {

    private Sheet sheet;
    private Dictionary<string, CellTypeDefinition> CustomEditors { get; } = new();

    protected override void OnInitialized()
    {
        CustomEditors.Add("number", CellTypeDefinition.Create<NumericEditor, TextRenderer>());


        sheet = new Sheet(1, 1);
        sheet.Cells[1, 1].Type = "number";

        base.OnInitialized();
    }

}